package cn.com.shaom.learning.sb.shiro.example.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;

/**
 * ClassName: MvcConfig
 * Description:
 * Date: 2018/2/22 10:20 【需求编号】
 *
 * @author Sam Sho
 * @version V1.0.0
 */
@Configuration
public class MvcConfig extends WebMvcConfigurerAdapter {

    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        registry.addViewController("/home").setViewName("/example/home");
        registry.addViewController("/").setViewName("/example/hello");
        registry.addViewController("/hello").setViewName("/example/hello");
        registry.addViewController("/login").setViewName("/example/login");
    }
}
